#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "hash.h"
#include "maptab.h"

void enc(const char *str)
{
    int len=strlen(str);
    unsigned int key=calc_hash((const unsigned char*)str, len);
    //printf("%08X\n", key);
    char filename[6]={0};
    getString(key, (char *)&filename);
    printf("%s %s\n", filename, str);
}
int main(int argc, char *argv[])
{
    enc("http://www.google.com.tw");
    enc("this is shit!!! lollol");
    enc("this is really gay!!! HAHAHAHAHA...... oh no XD, test test test and test llaallaalolLOL");
    enc("/");
    enc("/root/lol/fuckthatshit/XD");
    enc("huntex");
    enc("0");
    enc("1");
    enc("00");
    enc("");
    return 0;
}
